<%@tag description="page layout"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="authz" uri="/WEB-INF/authz.tld"%>
<%@attribute name="head" fragment="true"%>
<%@attribute name="heading" fragment="true"%>
<%@attribute name="title" required="true" type="java.lang.String"%>
<%@attribute name="nopanel" type="java.lang.Boolean"%>
<%@attribute name="script" required="false"
    type="java.lang.String"%>
<%@attribute name="stylesheet" required="false"
    type="java.lang.String"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>
${title} - boticelli control
</title>
<link rel="stylesheet" href="<c:url value="/style/blueprint/screen.css"/>" type="text/css" media="screen, projection">
<link rel="stylesheet" href="<c:url value="/app/colors"/>" type="text/css" media="screen, projection">
<link rel="stylesheet" href="<c:url value="/style/blueprint/print.css"/>" type="text/css" media="print">
<!--[if IE]>
<link rel="stylesheet" href="<c:url value="/style/blueprint/lib/ie.css"/>" type="text/css" media="screen, projection">
<link rel="stylesheet" href="<c:url value="/style/style-ie.css"/>" type="text/css" media="screen, projection">
<![endif]-->        
<link rel="stylesheet" href="<c:url value="/style/blueprint/plugins/fancy-type/fancy-type.css"/>" type="text/css" media="screen, projection">

<style type="text/css">
    @import url("<c:url value="/style/style.css"/>");
<c:forTokens var="item" items="${stylesheet}" delims=",">
    @import url("<c:url value="/style/"/>${item}");
</c:forTokens>
</style>

<script type="text/javascript"
    src="<c:url value="/script/ff-src.js"/>">
</script>

<c:forTokens var="item" items="${script}" delims=",">
    <script type="text/javascript"
        src="<c:url value="/script/"/>${item}">
</script>
</c:forTokens>

<%--
      Insert head fragment from page
    --%>
<jsp:invoke fragment="head" />
</head>
<body>
<c:if test="${!nopanel}">
<div id="panel" class="clear">
<div id="search">
<c:if test="${not empty searchError}">
<div class="error">${searchError}</div>
</c:if>
<form action="<c:url value="/app/search"/>">
<input class="text" type="text" name="search" value="${search}"><input class="submit" type="submit" value="Search">
</form>
</div>
<div id="userInfo">
        <a href="<c:url value="/app/chat/login"/>">chat</a>&nbsp;|&nbsp;
<authz:authorize ifAllGranted="ROLE_SUPERVISOR">
		<a href="<c:url value="/app/admin/reindex"/>">Reindex log</a>&nbsp;|&nbsp;
</authz:authorize>
<authz:authorize ifNotGranted="ROLE_ANONYMOUS">
	Logged in as <authz:authentication operation="username" /> &nbsp;<a href="<c:url value="/j_acegi_logout"/>">Log out</a>
</authz:authorize>
</div>
<div id="heading" class="alt">
<jsp:invoke fragment="heading"/>
</div>
</div>
</c:if>
<div id="content">
<jsp:doBody />
</div>
</body>
</html>
